//
//  KYMatchDoctorCountModel.m
//  kuaiyi
//
//  Created by 杨亮 on 16/3/16.
//  Copyright © 2016年 kuaiyi. All rights reserved.
//

#import "KYMatchDoctorCountModel.h"
#import "KYNetTool.h"
#import <MJExtension.h>

@implementation KYMatchDoctorCountModel
+(void)getMatchDoctorCountModelSuccess:(void(^)(NSString *count))count{
    NSString *url = @"http://iosapi.itcast.cn/matchedDoctorCount.json.php";
    NSDictionary *paramDic = @{@"login_token":@"985c96ce43bb5ef69de3e1ad8afaa83f",@"ci1_id":@(1),@"ci2_id":@(3),@"ci3_id":@(3),@"diagnosis_type":@(0),@"is_confirmed":@(1),@"user_id":@(1000089),@"complications":[NSArray new],@"has_diagnosis":@(2)};
    [[KYNetTool shareManager]POST:url parameters:paramDic progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:responseObject options:0 error:nil];
        NSDictionary *dictionary = dict[@"data"];
        KYMatchDoctorCountModel *model = [KYMatchDoctorCountModel mj_objectWithKeyValues:dictionary];
        if (count) {
            count(model.doctor_count);
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
        NSLog(@"%@",error.description);
    }];

}
@end
